package code.c03_stackQueue.javaApp;

import java.util.LinkedList;
import java.util.Queue;

/**
 * @author thinkpad - 83start
 * @version v1.0
 * @create 2022/10/8 20:12
 * @package code.c03_stackQueue.javaApp
 * @description 文件说明
 */

public class QueueApp {
    public static void main(String[] args) {
        Queue<Integer> queue = new LinkedList<>();

        System.out.println("Queue.isEmpty() ===>>> " + queue.isEmpty());

        System.out.println("Queue.size() ===>>> " + queue.size());

        // add && offer(推荐)
        System.out.println("Queue.add() ===>>> " + queue.add(9));
        System.out.println("Queue.offer() ===>>> " + queue.offer(3));

        // peek(推荐) && element
        System.out.println("Queue.peek() ===>>> " + queue.peek());
        System.out.println("Queue.element() ===>>> " + queue.element());

        // poll(推荐) && remove
        System.out.println("Queue.poll() ===>>> " + queue.poll());
        System.out.println("Queue.remove() ===>>> " + queue.remove());
    }

}
